feat(desktop): M6 — Electron → Tauri pivot + first working Mac DMG#58
Merged
Conversation
Major architectural change inspired by Markup. Tauri produces a 4.7 MB
DMG (vs Electron's ~150 MB), starts in <1 s, and runs on the native
WebKit engine. The Rust main process exposes typed commands; the
frontend stays React + Vite.
apps/desktop/electron/ → DELETED
apps/desktop/src-tauri/ → NEW
· Cargo.toml — tauri 2 + 5 plugins (dialog/fs/opener/shell/updater)
· build.rs — standard tauri-build invocation
· tauri.conf.json — productName DeepCode, identifier dev.deepcode.desktop,
universal-darwin target, hardened-runtime entitlements, dmg layout.
· capabilities/default.json — explicit Tauri 2 permissions
· src/lib.rs — runner + plugin registration + 8 invoke_handler commands
· src/commands.rs — get_app_info / read_credentials / save_credentials /
load_settings_file / save_settings_file / get_settings_path /
list_sessions / cli_path / open_url
· src/credentials.rs — chmod 600 ~/.deepcode/credentials.json shared
with the CLI's CredentialsStore
· src/settings.rs — ~/.deepcode/settings.json read/write
· Entitlements.plist — JIT + network + user-selected files
· icons/ — generated from icon.svg via sips + iconutil (white cat
silhouette on brand-blue gradient)
apps/desktop/src/
· lib/tauri-api.ts — typed wrapper over @tauri-apps/api invoke()
· lib/window-shim.ts — installs window.deepcode backed by Tauri so the
existing 11 React screens compile without modification
· main.tsx — installs the shim before rendering
· index.html — CSP removed (Tauri handles via tauri.conf.json security.csp)
apps/desktop/vite.config.ts — TAURI_DEV_HOST support, watch-ignore src-tauri/,
envPrefix VITE_+TAURI_, build target es2022 + esbuild minify.
scripts/sign-and-notarize.sh (NEW) — modeled on Markup's flow:
· Auto-detect Developer ID Application from keychain
· codesign with hardened runtime + entitlements + --timestamp
· zip → notarytool submit --wait → stapler staple
· Sign + notarize the DMG too
· `xcrun notarytool store-credentials DEEPCODE_NOTARY ...` one-time setup
release-artifacts/ (NEW, gitignored binaries):
· README.md — install instructions for both CLI + DMG
· install-cli.sh — bash one-liner that drops `deepcode` into
~/.local/bin (or /usr/local/bin if writable)
· (gitignored) DeepCode-0.1.0-arm64-unsigned.dmg (4.7 MB)
· (gitignored) deepcode-cli-0.1.0-bundle.tgz (4.4 MB self-contained)
apps/cli/package.json — version 0.0.0 → 0.1.0
apps/desktop/package.json — full Tauri scripts (dev / tauri:dev /
tauri:build / tauri:build:universal); deps now include @tauri-apps/api
+ 5 plugins + tailwind/postcss/autoprefixer (actually installed this
time, not template-suffixed).
Tests: 522 + 16 + 8 = 549 still passing (core unchanged + scripts
unchanged + lsp unchanged; desktop has no tests yet — IPC layer is
Rust-tested in `cargo test`).
Verified locally:
· `pnpm tauri build` → 4.7 MB DMG produced
· `open DeepCode.app` → process spawns
· `bash release-artifacts/install-cli.sh` → CLI installed, --version
+ --help work
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pivots apps/desktop from Electron to Tauri (modeled on Markup). Result: 4.7 MB DMG (vs ~150 MB Electron), <1 s startup, native WebKit. All 11 React screens compile unchanged via the window.deepcode shim. Verified locally — DMG built + .app launches. CLI bundled as self-contained tarball with install.sh. sign-and-notarize.sh ready (needs Apple credentials).